package org.corey.wyp.view
{
	import mx.containers.Canvas;
	import mx.core.UIComponent;
	
	import org.corey.wyp.view.financeContent.MonthAccountView;
	import org.corey.wyp.view.financeContent.MonthCurveView;
	import org.corey.wyp.view.financeContent.OldAccountSearcher;
	import org.corey.wyp.view.financeContent.TodayAccount;
	import org.corey.wyp.view.systemSetting.CommonDaySettingView;
	import org.corey.wyp.view.systemSetting.HolidaySettingView;
	import org.corey.wyp.view.systemSetting.MonthSettingView;
	import org.corey.wyp.vo.ViewVo;
	
	public class Views
	{	
		public static var views:Object={};
		
		public function Views()
		{
		}
		
		public static function getView(_viewId:String):UIComponent{
			var view:Canvas=views[_viewId];
			if(view==null){
				if(_viewId==ViewVo.OLD_ACCOUNT){
					view=new OldAccountSearcher();
				}else if(_viewId==ViewVo.TODAY_ACCOUNT){
					view=new TodayAccount();
				}else if(_viewId==ViewVo.MONTH_CURVE){
					view=new MonthCurveView();
				}else if(_viewId==ViewVo.MONTH_REPORT){
					view=new MonthAccountView();
				}else if(_viewId==ViewVo.MONTH_REPORT_DETAIL){
					view=new MonthAccountView();
				}else if(_viewId==ViewVo.DAY_SETTING){
					view=new CommonDaySettingView();
				}else if(_viewId==ViewVo.MONTH_SETTING){
					view=new MonthSettingView();
				}else if(_viewId==ViewVo.HOLIDAY_SETTING){
					view=new HolidaySettingView();
				}
			}
			 views[_viewId]=view;
			 return view;
		}

	}
}